from basic.device.Android import Android
from airtest.core.api import *

class helpPage(Android):

    # 列表title
    title = "com.cloudbae.lovenanning:id/title"
    # 我的页面
    myView = "com.cloudbae.lovenanning:id/my_item_container"
    # 关闭提示登录
    close_LoginFrame = "com.cloudbae.lovenanning:id/realNameFrame_close"

    @classmethod
    def clickHelp(self):
        closeHint = self.poco(self.close_LoginFrame)
        if closeHint.exists():
            closeHint.click()
        swipe((613, 1102), (613, 155))
        self.poco(text='帮助与反馈').click()

    # 获取问题列表
    @classmethod
    def getTitle(self):

        aa = self.poco(self.title)
        print("当前列表共有:",len(aa))
        listText = []
        for i in range(0, len(aa)):
            listText.append(aa[i].get_text())
        print(listText)
        return listText



